Computer programs are typically developed in relation to a given language of the users that will be using the programs. For example, a computer program may be developed in which all of the prompts to the user are provided in the English language, specifically American English. Computer programs are also frequently translated to different languages. A computer program in which all of the prompts to the user are provided in American English may be translated so that the prompts instead appear in Spanish, for instance.
To assist in translating a computer program written in relation to one given language to a number of other languages, all of the prompts, or strings, that the computer program may provide or display to the user may be stored in resource bundles encompassing one or more separate files, which are referred to herein as resource files. Each resource file may contain a list of strings in a given language, such as American English. The prompts are arranged so that when the computer program is to display a given string to the user, it looks up which string to display within one of the resource files.
Therefore, translating the computer program written in relation to one language to another language involves translating at least some of the strings within the resource files. Once a program has been developed in relation to its original language, for instance, a professional translator may be hired to translate at least some of the strings within the resource files to a different language. Desirably, the source code of the computer program itself does not have to be modified, or translated. It is noted that source code includes programming statements and instructions that are written by a programmer. Source code is what a programmer writes, but it is not directly executable by the computer. It is instead converted into machine language, or object code, by compilers, assemblers or interpreters. It is also noted that a given resource file or set of resource files may have prompts or other strings in a variety of different languages, and not necessarily just in one language.
In some situations, translation of a computer program from one language to another language may cause the computer program to fail, or otherwise operate incorrectly. This may be because the computer program may not have been written to appropriately handle accented characters. Such accented characters include those like á, è, ü, , and so on, which are common to many European languages, for instance, but which are not commonly found in the English language.
Computer program failure may also result from the computer program having not been written to appropriately handle characters that are represented by more than one byte of data. For example, English language characters typically are encoded by using a single byte of data having eight bits, because there are sufficiently few English characters to permit all of the characters to each be uniquely represented by eight bits. However, with Asian languages in particular, there may be a greater number of characters, such that more than eight bits are needed to uniquely represent each character. In such instances, typically each character is represented by two or more bytes, for a total of sixteen or more bits.
Therefore, historically, once a computer program was translated from one language to another language, the computer program was tested to make sure that it did not fail, or otherwise operate incorrectly, after translation. If the computer program was found to not operate correctly, then the source code was modified and converted into machine language or object code so that the computer program could be tested again. This iterative process continued until the program worked as intended.
However, this process of testing a computer program after translation in another language is problematic for at least three reasons, only one of which has been solved within the prior art. First, for a large and complex computer program, it may take several months, if not longer, to translate all the resource files of the computer program into the desired language. As a result, any errors within the source code of the computer program that causes the program to operate incorrectly after translation are not able to be found until the translation is completed.
To solve this problem, pseudo translation has been successfully used. Pseudo translation is also commonly referred to as mock translation, pseudo localization, and fake language translation. Pseudo translation is the process of converting the prompts or other strings of a computer program in a translation-like process. Pseudo translation can be performed by computer, without involving a translator, and thus can be used to test whether a computer program is likely to operate correctly once the computer program in actuality has been eventually translated into another language. That is, the computer program can be immediately tested in relation to its pseudo translation, such that successful testing can indicate that the computer program will likely operate properly when it is eventually and actually later translated to a real language.
In pseudo translation, the strings of a computer program are converted into words that do not truly represent any language, but which mimic common languages to which a computer program may be translated. Stated another way, pseudo translation is the process of converting strings that mimic another language without the benefit of actual translation into that language. Typically but not necessarily, however, the converted strings still are recognizable by someone knowledgeable in the original language.
For example, individual characters of strings may be converted to their accented equivalents. The English word “same,” may be pseudo translated to “ámè.” This latter pseudo-translated word is still recognizable within English, but the letters s, a, and e have been converted to accented versions of these letters. While the word “ámè” is not an actual word in any language, its accented letters can assist in testing the computer program to determine whether the computer program will operate correctly in the presence of the accented letters. That is, the computer program is tested against the pseudo-translated strings thereof, and once the computer program has been modified to operate correctly in the presence of the accented letters of such pseudo-translated strings (if such modification is even necessary), it can be concluded that the computer program will likely operate correctly upon the actual translation to another language.
Pseudo translation can also involve, depending on the target language or languages being mimicked, replacing single-byte characters with multiple-byte characters. As has been discussed above, for instance, Asian languages in particular commonly have their letters each represented by two or more bytes, whereas the English language usually has its letters each represented by one byte. Therefore, pseudo translation may involve replacing each single-byte character with a multiple-byte character. The resulting strings may still be recognizable in the original language, such as English. The computer program can then be tested to ensure that it works properly in relation to strings that have characters each represented by multiple bytes, without having to actually translate the program to another language.
Even with pseudo translation, however, a second problem has emerged in testing computer programs to ensure that they will operate correctly upon being translated to another language. This problem is that the testing-source code revision-source code compilation iterative process can be unduly burdensome and time-consuming to the developer of the computer program. For example, the developer may be able to test a computer program within an integrated development environment (IDE) in which the computer program is being developed in implicit or explicit relation to the language of the user interface of the computerized system on which the IDE is being run. An IDE is a set of computer programs run from a single user interface and that permit the editing, compilation, and debugging of a computer program being developed from a common menu.
However, IDE's do not allow for testing of computer programs in relation to different languages. Therefore, once a computer program has been developed within an IDE and is believed to be working correctly, it is actually “built,” in that an installation executable file for the computer program is generated, which when executed or run on a computing device installs the computer program for running or execution. During the building process, pseudo translated resource files, in lieu of the original resource files, may be used, so that the computer program upon installation and execution uses the pseudo translated resource files instead of the original resource files.
The computer program is installed and executed on a computing device and is executed using a user interface language that the pseudo translation is mimicking. If upon building, installation, and execution of a computer program, the computer program does not operate correctly, then this entire process has to be restarted. That is, the source code of the computer program has to be revised to correct for the errors that occur in relation to the pseudo translated resource files, the computer program has to be rebuilt, reinstalled, re-executed, and so on. This iterative process can be burdensome and time-consuming, because testing cannot be accomplished entirely within an IDE.
Furthermore, this process of testing computer programs in relation to different languages reveals a third problem in such prior art testing of computer programs in relation to different languages. This third problem is that debugging a pseudo-translated computer program, to determine which line of which source code file is causing the computer program to operate incorrectly in relation to a pseudo-translated resource file, can be difficult and itself time-consuming and burdensome to accomplish. Modern IDE's typically have robust debugging tools that allow a developer to step through source code line by line, so that the developer can easily locate exactly where the cause of a given problem lies.
However, these debugging tools cannot easily be used to test computer programs in relation to pseudo-translated resource files in the aforementioned prior art testing process. That is, because a computer program may not be able to be tested in relation to pseudo-translated resource files until it has been built, installed, and executed, an IDE's debugging tools cannot be used, because they can only be used within the confines of the IDE itself. The prior art testing of a computer program in relation to pseudo-translated resource files involves testing upon actual execution of the program on a computing device, after having switched the user interface language of the computerized system on which the IDE is being run to one that the pseudo translation is mimicking. Thus, after being built and being installed, the computer program can only be tested in real-time, and not on a source code line-by-source code line basis using a debugging tool. Therefore, once a problem has been identified, the developer has to manually locate the source of the problem within the source code of the computer program.
For these and other reasons, there is a need for the present invention.